/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package trefliq.EJB.webservice;

import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import trefliq.EJB.entities.Inventory;
import trefliq.EJB.sessionbeans.InventorySession;

/**
 *
 * @author dsimmons
 */
//@WebService(serviceName = "InventoryWebService")
@Stateless()
public class InventoryWebService {
    @EJB
    private InventorySession ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "createInventory")
    public Inventory createInventory(@WebParam(name = "Inventory") Inventory Inventory) {
        return ejbRef.createInventory(Inventory);
    }

    @WebMethod(operationName = "getAllInventory")
    public List<Inventory> getAllInventory() {
        return ejbRef.getAllInventory();
    }

    @WebMethod(operationName = "getInventoryById")
    public Inventory getInventoryById(@WebParam(name = "InventoryId") Long InventoryId) {
        return ejbRef.getInventoryById(InventoryId);
    }

    @WebMethod(operationName = "getInventoryForMediaId")
    public Inventory getInventoryForMediaId(@WebParam(name = "mediaId") Long mediaId) {
        return ejbRef.getInventoryForMediaId(mediaId);
    }

    @WebMethod(operationName = "getInventoryForMovie")
    public Inventory getInventoryForMovie(@WebParam(name = "movieId") Long movieId) {
        return ejbRef.getInventoryForMovie(movieId);
    }
    
}
